<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTagsRelationsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('tags_relations', function(Blueprint $table)
		{
            $table->increments('id');                           //标签关系 标识
            $table->unsignedInteger('project_id')->nullable();  //项目标识
            $table->unsignedInteger('investor_id')->nullable(); //投资人标识
            $table->unsignedInteger('org_id')->nullable();      //投资机构标识
            $table->unsignedInteger('tag_id');                  //标签标识

            $table->softDeletes();
            $table->timestamps();

		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('tags_relations');
	}

}
